<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnUpdatedInfoInTaskTable extends AbstractMigration
{
    public function up()
    {
        $this->table('task')
            ->addColumn('updated', 'integer', ['null' => false, 'default' => 0, 'limit' => 11, 'signed' => false, 'comment' => '更新时间',])
            ->addColumn('updated_by', 'integer', ['null' => false, 'default' => 0, 'limit' => 11, 'signed' => false, 'comment' => '更新人',])
            ->save();
    }

    public function down()
    {
        $this->table('task')
            ->removeColumn('updated')
            ->removeColumn('updated_by')
            ->save();
    }
}
